// eslint-disable-next-line no-unused-vars
import {getRequest,postRequest} from "@/utils/request";
// import axios from "axios";

export const getAreaList = () => {
    return getRequest('/camera/getArea');
}
export const searchArea = (keyword) =>{
    return getRequest('/camera/search?keyword='+keyword)
}
// export const getRecords = (id) =>{
//     return getRequest('/record/getRecordbyarea?areaId='+id)
// }
export const getArea = (params) => {
    return postRequest('/camera/get',params);
};
export const addArea = (params) => {
    return postRequest('/camera/addCamera',params);
};
export const updateArea = (params) => {
    return postRequest('/camera/update',params);
};
export const deleteArea = (params) => {
    return postRequest('/camera/delete',params);
};

export const audioEmotion = (id,src) => {
    return postRequest(`/tutelage/monitoring/audioEmotion?id=${id}&&src=${src}`);
};

// export const monitorRecordList = () => {
//     return getRequest('/record2');
// };
//
// export const aiMonitorRecordList = () => {
//     return getRequest('/record1');
// };
//
// export const monitorCountList = () => {
//     return getRequest('/count2');
// };
//
// export const aiMonitorCountList = () => {
//     return getRequest('/count1');
// };
//
// export const monitorCountPie = () => {
//     return getRequest('/pie2');
// };
//
// export const aiMonitorCountPie = () => {
//     return getRequest('/pie1');
// };
//
//
// export const setRegion = (params) => {
//     return postRequest('/region',params);
// };
// export const upload = (file) => {
//     axios.post('http://127.0.0.1:5000/upload',
//         file,{headers:{'Content-Type':'application/x-www-form-urlencoded' }}, ) //请求头要为表单
// }
// export const gaussList = () => {
//     return getRequest('/getGaussPic');
// }
